package com.jinlia.show.modules.wxapp.controller;

import com.jinlia.show.modules.base.model.po.GoodsPO;
import com.jinlia.show.modules.base.system.service.GoodsLabelMapperService;
import com.jinlia.show.modules.base.model.query.GoodsLabelQuery;
import com.jinlia.show.modules.wxapp.service.HomeService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@RequestMapping("/goods/tag")
public class GoodsTagController {
      @Autowired
    private HomeService homeService;
      @Autowired
    private GoodsLabelMapperService goodsTagMapperService;
    /**
     * 首页标签
     *
     * @return
     */
    @PostMapping(value = "/get/goods/po")
    public ResponseEntity<List<GoodsPO>> getGoodsPO(@RequestBody GoodsLabelQuery goodsTagQuery) {
        List<GoodsPO> list = goodsTagMapperService.getGoodsPO(goodsTagQuery);
        return ResponseEntity.ok(list);
    }
}
